import request from '@/utils/request'
export const getemployeeList = (params) => {
  return request.get('/sys/user', {
    params }
  )
}
export const exportemployee = () => {
  return request.get('/sys/user/export', {
    responseType: 'blob'
  })
}
export const importemployeeTemplate = () => {
  return request.get('/sys/user/import/template', {
    responseType: 'blob'
  })
}
export const importemployee = (data) => {
  return request.post('/sys/user/import', data)
}
export const deleteemployee = (id) => {
  return request.delete(`/sys/user/${id}`)
}
export const addemployee = (data) => {
  return request.post('/sys/user', data)
}
export const getemployee = (id) => {
  return request.get(`/sys/user/${id}`)
}
export const updateemployee = (data) => {
  return request.put(`/sys/user/${data.id}`, data)
}
export const assignRoles = (id, roleIds) => {
  return request.put('/sys/user/assignRoles', {
    id,
    roleIds
  })
}
